<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            background-color: beige;
        }

        .box1 {
            margin: 10px;
            height: 30px;
            /* border: 1px solid black; */

            display: flex;
            flex-direction: row;
        }

        /* 输入框与按钮4:1分配 */
        .ip1 {
            flex: 4;
        }

        .btn1 {
            flex: 1;
        }
    </style>
</head>

<body>
    <div class="box1">
        <!-- 输入框与按钮4:1分配 -->
        <input class="ip1" type="text">
        <button class="btn1">搜索</button>
    </div>

</body>

</html>